home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
wp2x110.zip
/
WP2X.CAT
< prev
next >
Wrap
Text File
|
1991-09-01
|
20KB
|
522 lines
WP2X(1) USER COMMANDS WP2X(1)
NAME
wp2x - A WordPerfect 4.2 to whatever converter
SYNOPSIS
wp2x [ -s ] [ -n_b_l_i_p ] configfile wpfile
DESCRIPTION
_W_p_2_x is intended to convert _s_i_m_p_l_e files stored in WordPer-
fect 4.2 format into any other document processing language
that uses plain text files. Examples include TeX, LaTeX,
troff, GML, and SCRIPT.
_W_p_2_x reads a configuration file and a WordPerfect 4.2 input
file, and uses the information in them to produce an output
file, which is sent to stdout. If the configuration file
cannot be found, a suffix of ._c_f_g is appended. the current
directory is searched, as well as the directory
/_u_s_r/_l_o_c_a_l/_l_i_b/_w_p_2_x , and the directories specified by the
environment variables _P_A_T_H , _D_P_A_T_H , and _W_P_2_X_L_I_B .
The following codes are processed by _w_p_2_x:
Hard returns.
Sort returns.
Hyphens of all ages.
Hard page breaks.
Margin settings.
Line spacing.
Tab characters.
Boldface, underline, redline.
Indented paragraphs. (The "Indent" code.)
Footnotes and endnotes.
Footnote numbers inside footnotes.
Extended IBM codes.
Superscript, subscript, overstrike.
Hyphenation on/off.
Justification on/off.
Widow/Orphan control.
Hyphenation zone.
Decimal alignment character.
Page centering.
Page number position.
Headers and footers.
Single-page suppression of header/footer information.
Lots of other stuff.
The following codes are recognized, but not translated.
Page number column
Underline mode
Column definitions
Footnote attributes
Automatic paragraph numbering
Marked text
Invisible text
These codes are not translated because documents that
require these codes typically would require significant
hand-editing. Hence, there's no point in trying to emulate
something you're going to delete anyway. (Remember, _w_p_2_x is
not intended to be used as an automated conversion program.
Rather, it is intended to be used as a single step in the
document conversion process, which gets most of the the
grunt work of conversion done and out of the way, so that
you can concentrate your efforts on converting the trickier
parts of the document. The object of the game is to produce
a readable conversion, rather than a perfect conversion.)
As the program runs, a dot is printed to _s_t_d_e_r_r for every
1024 characters converted. This can be suppressed with the
-s switch, and the interval between dots can be changed with
the -n switch.
OPTIONS
-s Suppresses all non-error output to _s_t_d_e_r_r, including
the _t_y_p_e_o_u_t banner, the progress dots, and warnings
about undefined expansions.
-n_b_l_i_p
Every _b_l_i_p tokens, a dot is emitted to _s_t_d_e_r_r, unless
the -s switch is given. The value _b_l_i_p must appear
imediately following the -n without an intervening
space. If no -n switch is supplied, then a value of
1024 is assumed.
USAGE
The configuration file controls how the file is converted
from WordPerfect 4.2 format. Each line of the configuration
file is of the form
identifier="list of codes"
where the list of codes is a string which will be placed in
the output stream whenever the corresponding WordPerfect
code is encountered. Standard C-style backslash-escape
sequences are recognized, as well as \xFF for hex values.
You do not have to backslash-protect a newline. Some iden-
tifiers supply replacable parameters, which can be interpo-
lated as follows:
%1 interpolate first parameter as a decimal integer.
%2 interpolate second parameter as a decimal integer.
%c interpolate first parameter as an ASCII character.
%\n interpolate a newline if the most-recently-output char-
acter was not already a newline. (The _\_n can be either
the C-style escape sequence, or an actual newline char-
acter.) Use this if the expansion must take place at
the beginning of a line. (For example, _t_r_o_f_f control
characters must appear as the first character in the
line in order to take effect.) This sequence is mean-
ingful only at the beginning of the string; if it
appears elsewhere, it is flagged as erroneous.
%% interpolate a percent-sign.
A percent sign followed by any other character is considered
an error. It is also an error to interpolate a parameter
that is not applicable to the identifier being defined. You
may interpolate the parameters as many times as, and in
whatever order, you wish. (With the exception of the %_\_n
code.)
Here follows a list of the accepted identifiers. In the
discussion, `%1' represents the first parameter, and `%2'
the second. Remember that the character version of %1 is
available as `%c'.
BEGIN Expanded at the beginning of the file.
END Expanded at the end of the file.
COMMENT Expanded when wp2x needs to insert a comment
into the output. The comment is passed as
%s.
PageNo Insert current page number
RomanPage Set page number to %1, and set roman-numeral
mode
ArabicPage Set page number to %1, and set arabic-numeral
mode
Tab What to do when you see a tab character.
BeginTabs Emitted when tab settings are about to
change. The BeginTabs code should delete all
existing tabs and prepare for new tab set-
tings to start. All tab values are given in
columns measured from the physical left edge
of the paper. (Not from the left margin.)
SetTab Set a normal (left-justified) tabstop at
column %1.
SetTabCenter Set a centered tabstop at column %1.
SetTabRight Set a right-justified tabstop at column %1.
SetTabDecimal Set a decimal tab at column %1.
EndTabs Finish the setting of tabstops.
For example, if the WordPerfect file contains a code that
says `Set new tabstops as follows: Regular tab at column
15, a centered tab at column 40, a right-justified tab at
column 59, and a regular tab at column 60', then the follow-
ing expansions are made in succession:
BeginTabs
SetTab(15)
SetTabCenter(40)
SetTabright(59)
SetTab(60)
EndTabs
HSpace
Hard (nonbreakable) space.
HPg Hard page break.
CondEOP
Force a new page if fewer than %1 half-lines remain on
current page.
HRt Hard return.
SRt Soft return.
- Breakable hyphen.
-- Breakable hyphen, appearing at the end of a line.
= Non-breakable hyphen.
\- Discretionary hyphen.
\-- Discretionary hyphen, appearing at the end of a line.
Marg Set left margin at %1 characters and right margin at %2
characters.
TopMargin
Set top margin to %1 lines.
PageLength
Set page length to %1 lines.
SS Single spacing.
DS Double spacing